//
//  DataShareCollectionViewCell.m
//  YouinRTCDemo
//
//  Created by 潘欣 on 2025/6/5.
//

#import "DataShareCollectionViewCell.h"
@interface DataShareCollectionViewCell ()
@property (nonatomic,strong)UILabel *label;
@property (nonatomic,strong)UILabel *value;
@property (nonatomic,strong)NSArray *labels2Array;
@end

@implementation DataShareCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.labels2Array = [NSArray arrayWithObjects:@"分享次数",@"邀请人数",@"有效邀请人数",@"本场拉新", nil];
        self.backgroundColor = RYColorForHex(@"#F9F9F9");
        self.value = [[UILabel alloc] init];
        self.value.textColor =RYColorForHex(@"#333333");
        self.value.font = [UIFont systemFontOfSize:14];
        [self addSubview:self.value];
        
        [self.value mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.mas_equalTo(self).offset(-12);
            make.centerY.mas_equalTo(self);
        }];
        
        
        self.label = [[UILabel alloc] init];
        self.label.textColor =RYColorForHex(@"#888888");
        self.label.font = [UIFont systemFontOfSize:12];
        [self addSubview:self.label];
        
        [self.label mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self).offset(12);
            make.centerY.mas_equalTo(self);
        }];
    }
    return self;
}
- (void)dataIndex:(NSInteger)index withData:(NSMutableArray *)data;
{
    if (data.count!=0) {
        self.label.text = self.labels2Array[index];
        self.value.text = data[1][index];
        
    }
}


@end
